<template>
    <div class="box">
        <h3>Child1组件</h3>
        <div>父组件传过来的数据: {{ msg }}</div>
        <button @click="$emit('update:msg', 'i love you')">修改父组件的msg数据</button>
    </div>
</template>

<script>
export default {
    name: "Child1",
    props: ['msg']
}
</script>

<style scoped>

</style>